//
//  AFMenuItem.h
//  AFChat
//
//  Created by Void on 2018/6/25.
//  Copyright © 2018年 afei. All rights reserved.
//

#import <Foundation/Foundation.h>

#define     CELL_MENU_ITEM     @"TLMenuItemCell"
@interface AFMenuItem : NSObject

/**
 * 左侧图标路径
 */
@property (nonatomic, strong) NSString *iconName;

/**
 * 网络icon
 */
@property (nonatomic, strong) NSString *iconURL;

/**
 * 标题
 */
@property (nonatomic, strong) NSString *title;

/**
 * 左侧气泡
 */
@property (nonatomic, strong) NSString *badge;

/**
 * 副标题
 */
@property (nonatomic, strong) NSString *subTitle;

/**
 * 右侧图片URL
 */
@property (nonatomic, strong) NSString *rightIconURL;
/**
 * 右侧图片红点
 */
@property (nonatomic, assign) BOOL showRightIconBadge;

- (void)setRightIconURL:(NSString *)rightIconURL withRightIconBadge:(BOOL)rightIconBadge;

@property (nonatomic, assign, readonly) CGSize badgeSize;

@end

AFMenuItem *createMenuItem(NSString *icon, NSString *title);

#pragma mark - AFCellGrounp
@interface AFMenuItemGrounp : NSObject

/** 组头部标题 */
@property (nonatomic, copy) NSString *headerTitle;

/** 组尾部说明 */
@property (nonatomic, copy) NSString *footerTitle;

/** 组元素 */
@property (nonatomic, strong) NSMutableArray *items;

/** 组元素数 */
@property (nonatomic, assign, readonly) NSUInteger itemsCount;


- (instancetype)initWithHeaderTitle:(NSString *)headerTitle footerTitle:(NSString *)footerTitle cellItems:(AFMenuItem *)firstObject, ...;

- (AFMenuItem *)itemAtIndex:(NSUInteger)index;

- (NSUInteger)indexOfItem:(AFMenuItem *)item;

@end

